package com.zzy.librarytest.service.impl;

import com.zzy.librarytest.dao.UserDao;
import com.zzy.librarytest.entity.User;
import com.zzy.librarytest.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDao userDao;

    @Override
    public Integer selectUser(String username, String password) {
        return userDao.selectUser(username,password);

    }

    @Override
    public List<User> selectAllUser() {
        return userDao.selectAllUser();
    }

    @Override
    public Integer insertUser(String username, String password) {
        return userDao.insertUser(username, password);
    }

    @Override
    public Integer deleteUser(String username) {
        return userDao.deleteUser(username);
    }

    @Override
    public Integer updateUser(String username , String password) {
        return userDao.updateUser(username , password);
    }

    @Override
    public User selectOneUser(String username) {
        return userDao.selectOneUser(username);
    }
}
